<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" 
	xmlns:f="http://java.sun.com/jsf/core" 
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:composite="http://java.sun.com/jsf/composite">
	
	<composite:interface>
		<composite:attribute name="caption"></composite:attribute>
		<composite:attribute name="panel"></composite:attribute>
		<composite:attribute name="disabled"></composite:attribute>
		<composite:facet name="commands"></composite:facet>
	</composite:interface>
	
	<composite:implementation>
	
		<h:form class="well">
		
			<h3 align="left">#{cc.attrs.caption}</h3>
			<br />	
			<h:messages></h:messages>
			<table>
			
				<tr>
					<th align="left">Category Parent</th>
					<td>
					
						<h:selectOneMenu disabled="#{cc.attrs.disabled}" value="#{cc.attrs.panel.categoryParentIdentifier}">
							<f:selectItem noSelectionOption="true"></f:selectItem>
							<f:selectItems
								value="#{cc.attrs.panel.categories}" 
								var="category" 
								itemLabel="#{category.name}" 
								itemValue="#{category.identifier}">
							</f:selectItems>
						</h:selectOneMenu>
					
					</td>
				</tr>

				<tr>
					<th align="left">Name</th>
					<td><h:inputText value="#{cc.attrs.panel.category.name}" disabled="#{cc.attrs.disabled}"></h:inputText></td>
				</tr>
				
				<tr>
					<th align="left">Description</th>
					<td><h:inputText value="#{cc.attrs.panel.category.description}" disabled="#{cc.attrs.disabled}"></h:inputText></td>
				</tr>
				
				<tr>
					<td align="right" colspan="2">
						<composite:renderFacet name="commands"></composite:renderFacet>
					</td>
				</tr>
				
			</table>	
		</h:form>
				
	</composite:implementation>	
	
</html>